{{ define "head" }}
<meta name="description" content="{{ .Title }} of {{ .Site.Title }}">
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/list.css" media="all">
{{ end }}

{{ define "title" }}
{{.Title }} | {{ .Site.Title }}
{{ end }}

{{ define "main" }}
<div class="container pt-5" id="list-page">
    <h2 class="text-center pb-2">{{.Title}}</h2>
    <div class="row">
        {{ range .Paginator.Pages }}
        <div class="col-lg-4 col-md-6 my-3">
            <div class="card-columns">
                <div class="card h-100">
                    {{ if and (not (.Site.Params.listPages.disableFeaturedImage | default false)) (.Params.image) }}
                    <div class="card-header">
                        <a href="{{ .RelPermalink }}">
                            <img src="{{ .Params.image }}" class="card-img-top" alt="{{ .Title }}">
                        </a>
                    </div>
                    {{ end }}
                    <div class="card-body bg-transparent p-4 shadow-sm">
                        <a href="{{ .RelPermalink }}" class="primary-font card-title">
                            <h5 class="card-title bg-transparent" title="{{ .Title }}">{{ .Title | truncate 25 }}</h5>
                        </a>
                        <div class="card-text secondary-font">
                            <p>{{ .Summary | truncate 300}}</p>
                        </div>
                    </div>
                    <div class="mt-auto post-footer bg-transparent py-3">
                        <span class="float-start bg-transparent">{{ .Date.Format (.Site.Params.datesFormat.articleList | default "January 2, 2006") }}</span>
                        <a href="{{ .RelPermalink }}" class="float-end btn btn-outline-info btn-sm">{{ .Site.Params.terms.read | default "Read" }}</a>
                    </div>
                </div>
            </div>
        </div>
        {{ end }}
        <div class="row justify-content-center">
            <div class="col-auto m-3">
                {{template "_internal/pagination.html" . }}
            </div>
        </div>
    </div>
</div>
{{ end }}